Release 10.1A: OpenEdge Data Management:
SQL Reference


DESCRIBE SELECT LIST

Writes information about select list items in a prepared SELECT statement to an output SQLDA structure.

Syntax

DESCRIBE SELECT LIST FOR statement_name INTO output_sqlda_name ; 

statement_name

The name of a SELECT statement to be processed using dynamic SQL steps. Typically, this is the same statement_name as in the PREPARE statement.

output_sqlda_name

The name of the SQLDA structure to which DESCRIBE will write information about select list items.

Note: Select list items are column names and expressions in a SELECT statement. A FETCH statement writes the values returned by a SELECT statement to the addresses stored in an output SQLDA.

To utilize the DESCRIBE SELECT LIST statement in your application, issue statements in the following order:

1. DECLARE CURSOR

2. PREPARE

3. OPEN

4. DESCRIBE SELECT LIST

5. FETCH

A DESCRIBE SELECT LIST statement writes the number of select list items to the sqld_nvars field of an output SQLDA. If the sqld_size field of the SQLDA is not equal to or greater than this number, DESCRIBE writes the value as a negative number to sqld_nvars. Design your application to check sqld_nvars for a negative number to determine if a particular output SQLDA is large enough to process the current SELECT statement.

Authorization

None

Related statements

PREPARE, DECLARE CURSOR, OPEN, FETCH, CLOSE


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095